<?php
namespace App\controllers;
use Framework\Databass;
class HomeControllers{
    protected $db;
    public function __construct(){
        $config  =require basePath('config/db.php');
        $this->db = new Database($config);
    }
    public function index(){
       $listing = $this->db->query('SELECT * FROMl listing LIMIT 6')->fetchAll();
    loadView('home',[
        'listings'=>$listings   
     ]);
    }
}

?>